╔══════════════════════════════════════════════════════════════════╗
║     PTERODACTYL PANEL & WINGS INSTALLATION GUIDE (ASCII)       ║
║              Complete Step-by-Step Walkthrough                  ║
╚══════════════════════════════════════════════════════════════════╝

┌─────────────────────────────────────────────────────────────────┐
│ STEP 1: START THE INSTALLATION                                │
└─────────────────────────────────────────────────────────────────┘

  Run this command as root:
  
  # bash <(curl -s https://pterodactyl-installer.se)


┌─────────────────────────────────────────────────────────────────┐
│ STEP 2: SELECT INSTALLATION TYPE                              │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │ Which version of Pterodactyl do you want to install?       │
  │ 1) Panel                                                  │
  │ 2) Wings                                                  │
  │ 3) Both (Panel & Wings)                                   │
  └─────────────────────────────────────────────────────────────┘
  
  >>> SELECT: 3 (BOTH)
  
  > Type "3" and press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 3: CONFIRM INSTALLATION                                  │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │ * Are you sure you want to continue? (y/N):               │
  └─────────────────────────────────────────────────────────────┘
  
  >>> SELECT: y (YES)
  
  > Type "y" and press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 4: DATABASE CONFIGURATION                                │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │ * Do you want to automatically configure the database?    │
  │   (y/N):                                                  │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> SELECT: y (YES)
  
  > Type "y" and press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 5: DATABASE USERNAME & PASSWORD                          │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │ * Database host username (pterodactyluser):               │
  └─────────────────────────────────────────────────────────────┘
  
  >>> LEAVE BLANK: Press ENTER (uses default)
  
  ┌─────────────────────────────────────────────────────────────────┐
  │ * Database host password:                                    │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> IMPORTANT! Type a strong password (write it down!)
  > Example: MyStr0ngP@ssw0rd!2026
  > Press ENTER after typing


┌─────────────────────────────────────────────────────────────────┐
│ STEP 6: MYSQL EXTERNAL ACCESS                                 │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │ * Do you want to configure MySQL to be accessed           │
  │   externally? (y/N):                                      │
  └─────────────────────────────────────────────────────────────┘
  
  >>> SELECT: n (NO)
  
  > Type "n" and press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 7: EMAIL CONFIGURATION                                   │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │ * Enter your email address for the panel:                 │
  └─────────────────────────────────────────────────────────────┘
  
  >>> Type your email: admin@example.com
  > Press ENTER

  ┌─────────────────────────────────────────────────────────────┐
  │ * Enter your company/panel name:                          │
  └─────────────────────────────────────────────────────────────┘
  
  >>> Type a name: My Game Panel
  > Or leave blank: Press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 8: CREATE ADMIN USER                                    │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │ * Would you like to create an admin user? (y/N):         │
  └─────────────────────────────────────────────────────────────┘
  
  >>> SELECT: y (YES)
  
  > Type "y" and press ENTER

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Enter your email address:                                  │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> Type your admin email: admin@example.com

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Enter your username:                                       │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> Type your username: admin

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Enter your first name:                                     │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> Type your first name: John

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Enter your last name:                                      │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> Type your last name: Doe

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Enter your password:                                       │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> IMPORTANT! Type a strong password (write it down!)
  > Example: Admin@2026#Secure!
  > Press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 9: SSL CONFIGURATION (PANEL)                            │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Do you want to use Let's Encrypt SSL? (y/N):               │
  └─────────────────────────────────────────────────────────────────┘
  
  ╔══════════════════════════════════════════════════════════════════╗
  ║  IF YOU HAVE A DOMAIN NAME:                                    ║
  ║    SELECT: y (YES)                                            ║
  ║    Then enter your domain: panel.example.com                  ║
  ║                                                                ║
  ║  IF YOU ONLY HAVE AN IP ADDRESS (NO DOMAIN):                  ║
  ║    SELECT: n (NO)                                            ║
  ║    The panel will use HTTP (port 80)                         ║
  ╚══════════════════════════════════════════════════════════════════╝
  
  >>> Choose based on your setup
  > Type "y" or "n" and press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 10: WINGS CONFIGURATION (UFW FIREWALL)                   │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Do you want to automatically configure UFW (firewall)?    │
  │   (y/N):                                                     │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> SELECT: y (YES) - Recommended!
  
  > Type "y" and press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 11: DATABASE USER FOR WINGS                              │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Do you want to configure a user for database hosts?       │
  │   (y/N):                                                     │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> SELECT: y (YES)
  
  > Type "y" and press ENTER

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Database host username (pterodactyluser):                  │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> LEAVE BLANK: Press ENTER

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Database host password:                                    │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> Type a password (write it down!)
  > Example: WingsDB@2026#Strong!
  > Press ENTER

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Do you want to configure MySQL to be accessed externally?  │
  │   (y/N):                                                     │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> SELECT: n (NO)
  
  > Type "n" and press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 12: SSL FOR WINGS                                        │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Do you want to automatically configure HTTPS using        │
  │   Let's Encrypt? (y/N):                                     │
  └─────────────────────────────────────────────────────────────────┘
  
  ╔══════════════════════════════════════════════════════════════════╗
  ║  IF YOU HAVE A DOMAIN (FQDN):                                  ║
  ║    SELECT: y (YES)                                            ║
  ║    Then enter your domain for Wings: node.example.com         ║
  ║                                                                ║
  ║  IF YOU ONLY HAVE IP ADDRESS:                                 ║
  ║    SELECT: n (NO)                                            ║
  ║    Wings will use HTTP                                       ║
  ╚══════════════════════════════════════════════════════════════════╝
  
  >>> Choose based on your setup
  > Type "y" or "n" and press ENTER


┌─────────────────────────────────────────────────────────────────┐
│ STEP 13: FINAL CONFIRMATION                                   │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────────┐
  │ * Proceed with installation? (y/N):                          │
  └─────────────────────────────────────────────────────────────────┘
  
  >>> SELECT: y (YES)
  
  > Type "y" and press ENTER
  > Wait for installation to complete...


╔══════════════════════════════════════════════════════════════════╗
║                   INSTALLATION COMPLETE!                        ║
║                                                                 ║
║  Your Pterodactyl Panel is now installed!                      ║
║                                                                 ║
║  Access your panel at:                                         ║
║  http://YOUR_SERVER_IP                                         ║
║  or                                                             ║
║  https://YOUR_DOMAIN (if SSL enabled)                          ║
║                                                                 ║
║  Login with:                                                   ║
║  Email: [your admin email]                                     ║
║  Password: [your admin password]                               ║
║                                                                 ║
║  ⚠️  IMPORTANT: Your Wings still needs to be configured!      ║
║  1. Log into the panel                                         ║
║  2. Go to Admin → Nodes → Create New                           ║
║  3. Generate the configuration file                            ║
║  4. Copy it to /etc/pterodactyl/config.yml                     ║
║  5. Run: systemctl start wings                                 ║
╚══════════════════════════════════════════════════════════════════╝


┌─────────────────────────────────────────────────────────────────┐
│              QUICK REFERENCE SHEET                             │
└─────────────────────────────────────────────────────────────────┘

  ┌──────────────┬─────────────┬──────────────────────────────┐
  │ QUESTION     │ ANSWER      │ REASON                       │
  ├──────────────┼─────────────┼──────────────────────────────┤
  │ Panel/Wings  │ 3 (Both)    │ Install everything at once   │
  │ Continue?    │ y           │ Start installation           │
  │ Auto DB?     │ y           │ Let script handle DB         │
  │ DB username  │ [ENTER]     │ Use default                  │
  │ DB password  │ [TYPE]      │ Strong password (save it)    │
  │ MySQL ext    │ n           │ No external access needed    │
  │ Admin user?  │ y           │ Create admin account         │
  │ Let's Encrypt│ n or y      │ n = IP only, y = domain     │
  │ Configure    │ y           │ Auto open firewall ports     │
  │ UFW?         │             │                              │
  │ Wings DB     │ y           │ Create DB user for Wings     │
  │ Wings SSL    │ n or y      │ Same as panel SSL choice     │
  └──────────────┴─────────────┴──────────────────────────────┘


┌─────────────────────────────────────────────────────────────────┐
│              FIREWALL PORTS TO OPEN                            │
└─────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────────────┐
  │  Port 80   - HTTP (Web Panel)                             │
  │  Port 443  - HTTPS (Web Panel) - if SSL enabled           │
  │  Port 8080 - Wings WebSocket (Server communication)       │
  │  Port 2022 - SFTP (File transfer for servers)             │
  └─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────┐
│              TROUBLESHOOTING COMMANDS                         │
└─────────────────────────────────────────────────────────────────┘

  # Check panel status
  systemctl status nginx
  systemctl status php8.2-fpm

  # Check wings status
  systemctl status wings

  # View panel logs
  tail -f /var/www/pterodactyl/storage/logs/laravel-*.log

  # View wings logs
  journalctl -u wings -f

  # Restart panel services
  systemctl restart nginx php8.2-fpm

  # Restart wings
  systemctl restart wings

  # Generate application key (if needed)
  php /var/www/pterodactyl/artisan key:generate --force

  # Clear cache
  php /var/www/pterodactyl/artisan config:clear
  php /var/www/pterodactyl/artisan cache:clear


┌─────────────────────────────────────────────────────────────────┐
│         POST-INSTALLATION: WINGS SETUP                        │
└─────────────────────────────────────────────────────────────────┘

  1. Login to panel: http://YOUR_SERVER_IP
  
  2. Go to: Admin → Nodes → Create New
  
  3. Fill in:
     • Name: Main Node
     • Description: (optional)
     • FQDN: YOUR_SERVER_IP or domain
     • Port: 8080
     • Behind Proxy: No
     • Public: Yes
  
  4. After creating, click on the node → Configuration
  
  5. Copy the configuration code
  
  6. Save to: /etc/pterodactyl/config.yml
  
  7. Start Wings:
     systemctl start wings
     systemctl enable wings


┌─────────────────────────────────────────────────────────────────┐
│                  IMPORTANT NOTES                               │
└─────────────────────────────────────────────────────────────────┘

  ⚠️  SAVE ALL PASSWORDS: Panel DB, Admin user, Wings DB
  
  ⚠️  Wait for migrations to complete (may take 2-5 minutes)
  
  ⚠️  If using IP instead of domain, you'll see a security warning
     (This is normal, just proceed)
  
  ⚠️  For production, use a domain with SSL certificates
  
  ⚠️  Backup /var/www/pterodactyl/.env file after installation


╔══════════════════════════════════════════════════════════════════╗
║                  INSTALLATION SUCCESS!                          ║
║                                                                 ║
║  Your Pterodactyl Panel is now ready for use!                  ║
║                                                                 ║
║  Documentation: https://pterodactyl.io/docs                    ║
║  Discord: https://discord.gg/pterodactyl                       ║
║  GitHub: https://github.com/pterodactyl/panel                 ║
║                                                                 ║
║  Need help? You can ask me anytime!                            ║
╚══════════════════════════════════════════════════════════════════╝